package com.oig.base.api.factory;

import com.oig.base.api.CustomsService;
import com.oig.base.api.fallback.CustomsServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;

public class CustomsServiceFallBackFactory implements FallbackFactory<CustomsService> {

    @Override
    public CustomsService create(Throwable cause) {
        CustomsServiceFallBackImpl customsServiceFallBack = new CustomsServiceFallBackImpl();
        customsServiceFallBack.setCause(cause);
        return customsServiceFallBack;
    }

}
